package com.fc.redap.entity;

import com.fc.redap.validate.AddGroup;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Getter
@Setter
public class UserEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    private Long id;

    @NotBlank(message="用户名不能为空")
    private String name;

    private String type;

    @NotBlank(message="密码不能为空", groups = AddGroup.class)
    private transient String password;

    private String nickName;

    @NotBlank(message="邮箱不能为空")
    @Email(message="邮箱格式不正确")
    private String email;

    @NotBlank(message="手机号码不能为空", groups = AddGroup.class)
    private String phone;

    /**
     * 状态  0：禁用   1：正常
     */
    private Integer status;

    private List<Long> roleIdList;

    private Date createTime;

    private Date updateTime;

    private Date expireTime;

    private String avatar;

    /**
     * 设备UUID
     */
    private String deviceUUID;

    /**
     * 微信OPEnID
     */
    private String openId;

    /**
     * 所属机构ID
     */
    private Long orgId;

    /* 积分 */
    private Integer point;

    /* 用户所属*/
    private OrgEntity organization;

}
